var http=require('http')
var url=require('url')

var html='<div>用户名:<input/></div>' +
    '<div>密码:<input/></div>' +
    '<div><button>提交</button></div>'

http.createServer(function (req,res) {
    var urlObj=url.parse(req.url,true);
    var query = urlObj.query;
    if (urlObj.pathname=='/login'){
        res.writeHead(200, {'Content-Type': 'text/html; charset=utf8'});
        res.write(html)
    }
    console.log(urlObj)
    res.end();
}).listen(3000);

console.log('the server is running at port 3000');
